package com.sims.action.student;

import org.springframework.beans.factory.annotation.Autowired;

import com.sims.bean.Student;
import com.sims.service.StudentService;
import com.sims.util.ActionEnhanced;
import com.sims.util.Constant;

/**
 * 学生修改个人的电话号码
 * @author 友成
 *
 */
@SuppressWarnings("serial")
public class ModifyTelAction extends ActionEnhanced{

	private Student student;

	@Autowired
	private StudentService studentService;

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Override
	public String execute() {

		result = studentService.modifyTel(student);
		if (result.containsKey(Constant.SUCCESS)) {
			System.out.println("success");
			return SUCCESS;
		}
		// System.out.println("error");
		return ERROR;
	}
}
